import http from '@/utils/request'
import model from "@/config/model";
export default {
  queryWithPage: {
    url: `${model.API_URL}/auth-menu-management/v1.0/auth-menu/query-with-page`,
    name: '菜单-分页查询',
    post: async function (data) {
      return await http.post(this.url, data)
    }
  },
  queryWithNoPage: {
    url: `${model.API_URL}/auth-menu-management/v1.0/auth-menu/query-with-no-page`,
    name: '菜单-不分页查询',
    post: async function (data) {
      return await http.post(this.url, data)
    }
  },
  queryAll: {
    url: `${model.API_URL}/auth-menu-management/v1.0/auth-menu/query-all`,
    name: '菜单-查询所有',
    get: async function () {
      return await http.get(this.url)
    }
  },
  queryById: {
    url: `${model.API_URL}/auth-menu-management/v1.0/auth-menu/`,
    name: '菜单-通过id查询',
    get: async function (data) {
      return await http.get(this.url + data)
    }
  },
  save: {
    url: `${model.API_URL}/auth-menu-management/v1.0/auth-menu/save`,
    name: '菜单-保存',
    post: async function (data) {
      return await http.post(this.url, data)
    }
  },
  modify: {
    url: `${model.API_URL}/auth-menu-management/v1.0/auth-menu/modify`,
    name: '菜单-修改',
    post: async function (data) {
      return await http.post(this.url, data)
    }
  },
  delete: {
    url: `${model.API_URL}/auth-menu-management/v1.0/auth-menu/delete/`,
    name: '菜单-删除',
    get: async function (id) {
      return await http.get(this.url + id)
    }
  },
  deleteBatch: {
    url: `${model.API_URL}/auth-menu-management/v1.0/auth-menu/delete-batch`,
    name: '菜单-批量删除',
    post: async function (data) {
      return await http.post(this.url, data)
    }
  },
}
